<template>
  <div id="app">
    <Header />
    <router-view></router-view>
    <Footer v-show="!$route.meta.isShow "/>
  </div>
</template>

<script>
import Header from '@comp/Header'
import Footer from '@comp/Footer'
import { mapActions } from "vuex";
export default {
  name: 'App',
  components: {
    Header,
    Footer
  },
  mounted(){
    //1、挂载后就让数据发送请求
    this.getCategoryList();
  },
  methods:{
    //类别列表放在nactype的时候每一次加载都会请求
    //所以放到 app 容器中，只会加载一次
    ...mapActions("home", ["getCategoryList"]),
  }
}
</script>

<style>

</style>
